<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>
<?//echo javascript_tag('jQuery.noConflict();') ?>

<form class="yform columnar" action="<?php echo url_for('venta/create') ?>" method="post">
    <?php if (!$form->getObject()->isNew()): ?>
    <input type="hidden" name="sf_method" value="put" />
    <?php endif; ?>
    <?php echo $form->renderHiddenFields() ?>
    <?php if (!$form->getObject()->isNew()): ?>
    &nbsp;<?php echo link_to('Delete', 'venta/delete?id='.$form->getObject()->getId(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?>
    <?php endif; ?>
    <?echo input_hidden_tag('nro_product', 1); ?>
    <?echo input_hidden_tag('removed_products', '') ?>
    <?php echo $form->renderGlobalErrors() ?>
<div id="resp"></div>
    <table>

        <tbody id="tbody">
            <?php echo include_partial('product_row', array('form' => $form, 'nro' => $sf_request->getParameter('nro', 0), 'total_filas' => $sf_request->getParameter('total_filas', 1))) ?>
        </tbody>
    </table>
    <div class="type-button"><?echo submit_tag('Registrar') ?></div>
</form>
